<template>
	<view class="fl-s-c p-r-30">
		<view class="fr-c relative" style="margin-top: 110rpx;">
			<text>可提现（元）</text>
			<navigator url="/pages/UserCenter/RecommendationCenter/CommissionWithdrawal/CommissionWithdrawal" class="fr-c tx">提现</navigator>
		</view>
		<text style="color: #000000; font-size: 66rpx; margin-top: 5rpx;" class="bold">{{info.money}}</text>
		<view class="fr-b-c w-1 m-t-40">
			<view class="flex-1 fl-c">
				<text style="color: #666666;">订单数量</text>
				<text class="m-t-10 fs-40" style="color: #000000;">{{info.order_num}}</text>
			</view>
			<u-line direction="col" length="54rpx"></u-line>
			<view class="flex-1 fl-c">
				<text style="color: #666666;">下单数量</text>
				<text class="m-t-10 fs-40" style="color: #000000;">{{info.child_num}}</text>
			</view>
		</view>
		<!-- tab -->
	<!-- 	<u-sticky class="w-1" style="background-color: #FFFFFF;">
			<u-tabs class="fm-ali" active-color="#FA360A" inactive-color="#666666" bar-width="20" font-size="28"
				:list="tabs" :current="current" item-width="25%" @change="change"></u-tabs>
		</u-sticky> -->
		<view class="w-1 fl-s-s">
			<view class="list-item w-1 fl-c-s" v-for="(item,index) in orders" :key="index">
				<view class="w-1 fr-b-c">
					<text class="fs-24" style="color: #666666;">订单号：{{item.order_no}}</text>
					<text class="fs-30" style="color: #FA360A;">{{item.order_price}}</text>
				</view>
				<view class="w-1 fr-b-c fs-24" style="margin-top: 15rpx;">
					<text style="color: #000000;">{{item.level==1?'直属下级':'间接下级'}}</text>
					<text style="color: #666666;">{{item.create_time}}</text>
				</view>
			</view>
		</view>
		<view class="m-t-250" v-if="nodata">
			<u-empty mode="data"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabs: [{
					name: '全部',
				}, {
					name: '待结算',
				}, {
					name: '已结算'
				}, {
					name: '已失效'
				}],
				current: 0,
				info:null,
				orders:[],
				nodata:false
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			getList() {
				this.$get({
					url: '/appuser/shareOrder',
					data: {
						access_token:uni.getStorageSync('access_token')
					}
				}).then(res => {
					this.info = res.list.info
					this.orders = res.list.orders
					this.nodata = !this.orders.length
				}).catch(err=>{
					this.orders = []
					this.nodata = !this.orders.length
				})
			},
			change(index) {
				this.current = index
			}
		}
	}
</script>

<style scoped>
	.tx {
		position: absolute;
		right: -94rpx;
		width: 84rpx;
		height: 46rpx;
		background: #FA360A;
		border-radius: 23rpx;
		font-size: 22rpx;
		color: #FFFFFF;
	}

	>>>.u-tabs__wrapper__nav__line {
		border-radius: 0 !important;
	}

	.list-item {
		border-bottom: 2rpx solid #F4F4F4;
		padding: 34rpx 0 28rpx 0;
	}
</style>
